//
// Created by dong on 2025/10/20.
//

#ifndef BASEC_SLABEL_H
#define BASEC_SLABEL_H

#include "SWidget.h"

class SLabel:public Swidget
{
public:
    enum class LabelType
    {
        TextLabel,
        ImgLabel
    };
public:

    SLabel(const string& text="Label");
    SLabel(const string& text,const string& url);
public:
    virtual void paintEvent(SDL_Event* msg) override;
    void setfont(const string& font);
    void settext(const string& text);
    void setsize(const int& size);
    void setsize(int w,int h);
protected:
    string m_font;
    string m_text;
    int m_size;
    LabelType m_type;
    SDL_Surface* img;
    string imageUrl;

};


#endif //BASEC_SLABEL_H